3ff9c1e2113a4f203eab5092b00ea9759d6c1ea5,common/buildcraft/lib/nbt/NbtSquisher.java,NbtSquisher,expand,#number[]#,102
Before Change
ByteBuf buf;
if (nbtWrittenType == NBTSquishConstants.BUILDCRAFT_V1_COMPRESSED) {
try (GZIPInputStream gzip = new GZIPInputStream(bais)) {
buf = Unpooled.wrappedBuffer(IOUtils.toByteArray(gzip));
}
} else {
buf = Unpooled.wrappedBuffer(bytes);
buf.readByte();
}
try {
NBTSquishMap map = NBTSquishMapReader.read(buf);
WrittenType type = map.getWrittenType();
int index = type.readIndex(buf);
NBTBase nbt = map.getTagForReading(index);
return (NBTTagCompound) nbt;
} catch (IndexOutOfBoundsException ioobe) {
throw new IOException("The byte buf was not big enough!", ioobe);
}
After Change
PacketBuffer buf;
if (nbtWrittenType == NBTSquishConstants.BUILDCRAFT_V1_COMPRESSED) {
try (GZIPInputStream gzip = new GZIPInputStream(bais)) {
buf = new PacketBuffer(Unpooled.wrappedBuffer(IOUtils.toByteArray(gzip)));
}
} else {
buf = new PacketBuffer(Unpooled.wrappedBuffer(bytes));